package cnedu.ncist.analysistopic.web;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import edu.ncist.wang.hkdf.bussiness.blo.AbstractFlowHandler;

public class AnalysistopicFlowHandler extends AbstractFlowHandler{
	
	public String doFlowProcess(Map paraMap) {
		String actionType = (String)paraMap.get("ACTIONTYPE");
		
		if("topic_Finish_Condition".equals(actionType)){
			return topic_Finish_Condition(paraMap);
		}else if("topic_Finish_Detailed".equals(actionType)){
			return topic_Finish_Detailed(paraMap);
		}else{
			ActionTypeError();
		}
		
		return null;
	}
	
	public String topic_Finish_Condition(Map paraMap){
		HttpServletRequest request = (HttpServletRequest)paraMap.get("REQUEST");
		Map map = (Map)paraMap.get("RESULTMAP");
		
		request.setAttribute("LISTINFO", map.get("LISTINFO"));
		request.setAttribute("CONDITIONMAP", map.get("CONDITIONMAP"));
		
		return (String)map.get("RESULT");
	}
	public String topic_Finish_Detailed(Map paraMap){
		HttpServletRequest request = (HttpServletRequest)paraMap.get("REQUEST");
		Map map = (Map)paraMap.get("RESULTMAP");

		request.setAttribute("LISTINFO", map.get("LISTINFO"));
		request.setAttribute("CONDITIONMAP", map.get("CONDITIONMAP"));
		
		return (String)map.get("RESULT");
	}
	
}
